<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML>
<%@include file="/common/taglibs.jsp" %>
<%@include file="/common/javascript.jsp" %>
<html>
<head>
	<base href="<%=basePath%>">
	<title>房地产管理系统</title>
	<script type="text/javascript">
	 $(function(){
	 
	 	if(self.location!=top.location)
	 	 { top.location.href=self.location.href;}
	 	 
	 	$("#btnSubmit").bind('click',function(){
	 		$("#mainform").form('submit',{
	 			success: function(data){  
					var msg = eval("(" + data + ")"); 
					if (!msg.success){
						$.messager.alert('提示',"错误"+msg.message,"info");
						$("#name").val('');
						$("#pwd").val('');
        			}else{
        				top.location.href='manageAction_toMain';
        			}
        		}
	 		});
	 	});
	 });
	</script>
	<style type="text/css">
		body{
			background: url("images/login.jpg") top center no-repeat #fff; color: #3a3a3a;
		}
		form{ width: 400px; margin: 300px auto 0; }
		fieldset{border: 0px;}
		.clear{ clear: both; }
		label{ width: 115px; text-align: right; float: left; margin: 0 10px 0 0; padding: 9px 0 5px 0; font-size: 16px; }
		input{ width: 220px; display: block; padding: 4px; margin: 0 0 10px 0; font-size: 18px;
					  color: #3a3a3a; font-family: Georgia, serif;}
		.button	{ background: url('images/button-bg.png') repeat-x top center; border: 1px solid #999;
					  -moz-border-radius: 5px; padding: 5px; color: black; font-weight: bold;
					  -webkit-border-radius: 5px; font-size: 13px;  width: 70px;float: left;margin:0px 10px 0px 10px; }
		.button:hover{ background: white; color: black; }
	</style>
</head>

<body>
	<form id="mainform" action="loginAction_isLogin" method="post">
		<fieldset>
			<label for="login">用户名：</label>
			<input type="text" id="name" name="model.name">
			<div class="clear"></div>
			<label for="pwd">密码：</label>
			<input type="password" id="pwd" name="model.password">
			<div style="margin-left: 185px;">
				<input id="btnSubmit" type="button" class="button" value="登录">
				<input type="reset" class="button" value="重置">
			</div>
		</fieldset>
	</form>
		
</body>
</html>
